package com.atguigu.gmall.product.mapper;

import com.atguigu.gmall.model.product.SpuSaleAttr;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * spu规格属性mapper层
 */
@Mapper
public interface SpuSaleAttrMapper extends BaseMapper<SpuSaleAttr> {
    /**
     * 查询spu销售属性列表
     * @param spuId
     * @return
     */
   public List<SpuSaleAttr> selectSpuSaleAttrlist(@Param("spu_id")Long spuId);

    /**
     * 通过skuid和spuid查询当前商品的销售属性和当前spu的所有的销售属性
     * @param spuId
     * @param skuId
     * @return
     */
   public List<SpuSaleAttr> selectSaleAttrBySpuAndSku(Long skuId, Long spuId);
}
